package com.wf.course.dao;

import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.utils.page.PageBean;
import com.wf.course.model.goods.GoodsOrder;
import com.wf.course.model.goods.GoodsOrderRelation;

/**
 * 播放记录
 *
 */
public interface IGoodsOrderMapper {

	/**
	 * 根据pageBean中封装的查询条件查询
	 * @param pageBean
	 * @return
	 */
	public List<GoodsOrder> queryList(PageBean<GoodsOrder> pageBean);
	/**
	 * 查询总数量
	 * @param pageBean
	 * @return
	 */
	public Integer getTotalCount(PageBean<GoodsOrder> pageBean);
	/**
	 * 添加
	 * @param 
	 */
	public void saveGoodsOrder(GoodsOrder goodsOrder);
	/**
	 * 修改
	 * @param 
	 */
	public void updateGoodsOrder(GoodsOrder goodsOrder);
	/**
	 * 查询
	 * @param id
	 */
	public GoodsOrder queryGoodsOrderById(@Param("id")Integer id);
	/**
	 * 删除
	 * @param id
	 */
	public void deleteById(@Param("id")Integer id);
	
	/**
	 * 查询
	 * @param orderCode
	 */
	public GoodsOrder queryGoodsOrderByOrderCode(@Param("orderCode")String  orderCode);
		
	
	/**
	 * 根据pageBean中封装的查询条件查询
	 * @param pageBean
	 * @return
	 */
	public List<GoodsOrder> orderList(PageBean<GoodsOrder> pageBean);
	/**
	 * 根据订单号删除
	 * @param id
	 */	
	public void deleteByOrderCode(@Param("orderCode")String  orderCode);
	
	/**
	 * 修改
	 * @param 
	 */
	public void updateGoodsOrderById(GoodsOrder goodsOrder);
	/**
	 * 查询当天订单量
	 * @return
	 */
	public GoodsOrder getDayCount(String orderTime);
	
	/**
	 * 订单实际支付总金额统计
	 */
	public GoodsOrder getTotalAmount(@Param("userSource")String userSource,@Param("orderBeginTime")String  orderBeginTime,
			@Param("orderEndTime")String  orderEndTime);
	
	
	/**
	 * 查询配置的订单列表
	 * 根据pageBean中封装的查询条件查询
	 * @param pageBean
	 * @return
	 */
	public List<GoodsOrder> queryConfigOrdersList(PageBean<GoodsOrder> pageBean);
	/**
	 * 查询配置的订单数量
	 * @param pageBean
	 * @return
	 */
	public Integer getConfigOrdersTotal(PageBean<GoodsOrder> pageBean);
	
	/**
	 * 查询待支付状态的订单
	 */
	public List<GoodsOrder> queryNoPayOrdersList();
	
	/**
	 * 将超过30分钟微支付的订单，状态改为已取消
	 */
	public Integer updateOrderStatus(List<String> orders);
	
	/**
	 * 根据微信支付单号，查找订单
	 */
	public GoodsOrder getOrderByWxOrder(@Param("transaction_id")String transaction_id );
	
	/**
	 * 更新支付时间
	 * @param 
	 */
	public void updatePayTime(GoodsOrder goodsOrder);
	
	/**
	 * 配置订单导出
	 * @param pageBean
	 * @return
	 */
	public List<GoodsOrder> exportConfigGoodsOrder(PageBean<GoodsOrder> pageBean);
	/**
	 * 根据商品编号和类型，查询支付成功的订单列表
	 * @param goodsId
	 * @param goodsSort
	 * @return
	 */
	public List<GoodsOrder> getGoodsName(
		    @Param("orderCode")String orderCode);
	/**
	 * 查询
	 * @param orderCode
	 */
	public GoodsOrder queryGoodsOrderByOrderCodes(@Param("orderCode")String  orderCode);
	/**
	 * 查询订单详情信息
	 * @param orderCode
	 */
    public GoodsOrder queryorderCode(@Param("orderCode")String  orderCode);
		
	
}
